import request from '@/utils/request'
// 获取-文章分类详情
const artGetChannelsService = () => request.get('/my/cate/list')
// 添加文章分类
const artAddChannelService = (data) => request.post('/my/cate/add', data)
// 编辑文章分类
const artEditChannelService = (data) => request.put('/my/cate/info', data)
// 删除文章分类
const artDelChannelService = (id) =>
  request.delete('/my/cate/del', {
    params: { id }
  })

const artGetListService = (params) =>
  request.get('/my/article/list', { params })
// 添加文章
const artPublishService = (data) => request.post('/my/article/add', data)
// 文章：获取文章详情
const artGetDetailService = (id) =>
  request.get('/my/article/info', {
    params: { id }
  })
// 文章：编辑文章详情
const artEditService = (data) => request.put('my/article/info', data)
// 删除
const artDelService = (id) =>
  request.delete('my/article/info', { params: { id } })
export {
  artGetChannelsService,
  artAddChannelService,
  artEditChannelService,
  artDelChannelService,
  artGetListService,
  artPublishService,
  artGetDetailService,
  artEditService,
  artDelService
}
